import React, { Component } from "react";
import { Consumer } from "./App";

// const { Consumer } = createContext();

class Child2 extends Component {
  state = {};
  render() {
    return (
      <div>
        child2组件 -<Consumer>{(value) => <span>{value.num}</span>}</Consumer>
      </div>
    );
  }
}

export default Child2;
